using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;

namespace RikMigrations.Tests
{
	[TestFixture]
	public class DependencyTreeTests
	{
		[Test, ExpectedException(typeof(CircularDependencyException))]
		public void Loop()
		{
			DependencyTree<int> tree = new DependencyTree<int>();
			tree.Add(5, 6);
			tree.Add(6, 5);
		}

		[Test, ExpectedException(typeof(CircularDependencyException))]
		public void Loop2()
		{
			DependencyTree<int> tree = new DependencyTree<int>();
			tree.Add(5, 6);
			tree.Add(6, 7);
			tree.Add(7, 5);
		}
	}
}